﻿CREATE PROCEDURE [dbo].[AttachProjectMember]
@ProjectID INT, @UserID INT, @StartDate DATETIME=NULL, @EndDate DATETIME=NULL, @HourlyRate MONEY=NULL
AS
IF @StartDate = '1/1/1980' SET @StartDate = NULL
IF @EndDate = '1/1/1980' SET @EndDate = NULL
IF @HourlyRate = 0 SET @HourlyRate = NULL

INSERT INTO ProjectMembers(
				ProjectID,
				UserID,
				StartDate,
				EndDate,
				HourlyRate
			)
VALUES		(
				@ProjectID,
				@UserID,
				@StartDate,
				@EndDate,
				@HourlyRate
			)


